Conversation
| public class Main { | ||
|
|
||
| public static void main(String[] args) { | ||
| new GameService().run(); |
There was a problem hiding this comment.
I really don't understand what happened. It seems the interface needs refactoring. Also, it would be better if you add visual field representation
There was a problem hiding this comment.
There's much repetitive code, and it makes reading code harder
There was a problem hiding this comment.
But the interface was refactored, although I couldn't continue to play
There was a problem hiding this comment.
Good, I didn't find any bugs! As optional improvement, marking cells around a sunk ship as hit is a good idea. Approved!
|
|
||
| import static java.lang.annotation.ElementType.FIELD; | ||
|
|
||
| //аннотация отмечает поля класса как важные |
There was a problem hiding this comment.
Good examle + using comparator!
| MapProblemsCollisionGenerator mpcg1 = new MapProblemsCollisionGenerator("Generator 1"); | ||
| MapProblemsCollisionGenerator mpcg2 = new MapProblemsCollisionGenerator("Generator 2"); | ||
| Map<MapProblemsCollisionGenerator, Integer> collisionMap = new HashMap<>(); | ||
| collisionMap.put(mpcg1, 1); | ||
| collisionMap.put(mpcg2, 2); | ||
| System.out.println(collisionMap.toString()); |
There was a problem hiding this comment.
Opt: how do you know there's collision? You could as example add sout to equals, so you'll know that collision appeared
| assertEquals("changed", singleton1.getState()); | ||
| assertEquals("changed", singleton2.getState()); | ||
|
|
||
| assertEquals(singleton2, singleton1); |
There was a problem hiding this comment.
Opt: they could be equal, but not the same objects, right?
NikolaevArtem
left a comment
There was a problem hiding this comment.
Good! I think the course project needs some refactoring, and there are small changes in HW_3. Ping me when it's done



No description provided.